import { Injectable } from '@nestjs/common';
import { PrismaService } from 'src/prisma/prisma.service';

@Injectable()
export class UserService {
  constructor(private readonly prismaService: PrismaService) {}
  async findOne(id: number) {
    const res = await this.prismaService.user.findUnique({
      where: {
        id,
      },
      select: {
        username: true,
        id: true,
      },
    });

    return res;
  }
}
